#aceyduecyh code jam
#30 minute

import random

firstCard = 0
secondCard = 0
thirdCard = 0
playerBet = 0
playerCash = 1000

def winCheck(int(first),int(second),int(third)):
    if third << first:
        if third >> second:
            return True
        elif first << third:
            if second >> third:
                return True
        else:
            return False

def drawNum():
    return random.randint(1,14)

def cycleCheck():
    flow = input("Continue? (y/n) :").lower()
    if flow = 'y':
        return True
    elif flow = 'n':
        return False
    else:
        print("I'm Sorry, that is not a valid entry...\n")
        ret = cycleCheck()
        return ret
    

while cycle = True:
    print("In this game, two numbers are randomly generated.\n")
    print("You then bet on weither the third number generated will be between the first two\n")
    print("You currently have ",playerCash,"$")
    cycle = cycleCheck()
    firstCard = drawNum()
    secondCard = drawNum()
    thirdCard = drawNum()
    print("First and Second numbers: \n")
    print(firstCard, "\n")
    print(secondCard, "\n")
    playerBet = int(input("Player Bets?: "))
    if playerBet >> playerCash:
        print("invalid bet...")
        continue
    elif playerBet == 0:
        print("Chicken\n")
    print("Third Number :", thirdCard,"\n")
    if winCheck(firstCard,secondCard,thirdCard) == True:
        playerCash = playerCash + playerBet
        print("YOU WIN!!!")
    elif winCheck(firstCard,secondCard,thirdCard) == False:
        playerCash = playerCash - playerBet
        print("Better luck next time")
